import java.util.Scanner;
public class Digit{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个三位数：");
        int num = sc.nextInt();
        int g = num % 10;
        int s = num / 10 % 10;
        int b = num / 100;
        System.out.println(num + "各位之和为：" + (g+s+b));
    }
  }